package cn.com.customer.manager.bean

import android.os.Parcel
import android.os.Parcelable
import com.google.gson.annotations.SerializedName

data class MessageListInfo(val sysNotice:NoticiList,val orgNotice:NoticiList)
data class NoticiList(val notReadCount:String,val notReadList:List<Notice>,val readList:List<Notice>)
data class Notice(val noticeId:String,val noticeTitle:String,val noticeContent:String,val noticeAttachments:List<Attachments>):Parcelable{
    constructor(parcel: Parcel) : this(
            parcel.readString(),
            parcel.readString(),
            parcel.readString(),
            parcel.createTypedArrayList(Attachments.CREATOR)) {
    }

    override fun writeToParcel(parcel: Parcel, flags: Int) {
        parcel.writeString(noticeId)
        parcel.writeString(noticeTitle)
        parcel.writeString(noticeContent)
        parcel.writeTypedList(noticeAttachments)
    }

    override fun describeContents(): Int {
        return 0
    }

    companion object CREATOR : Parcelable.Creator<Notice> {
        override fun createFromParcel(parcel: Parcel): Notice {
            return Notice(parcel)
        }

        override fun newArray(size: Int): Array<Notice?> {
            return arrayOfNulls(size)
        }
    }

}
